home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc B) / Acorn User China CD-ROM (UK) (Disc B).bin / STUTTGART / FROMUTS / ZAP / !Zap_!Help < prev    next >
Encoding:
Text File  |  1992-10-02  |  14.2 KB  |  362 lines

  1. *****************************************************************************
  2. * >!Help file for !Zap version 0.70                        *
  3. * All code is copyright Dominic Symes 1992. Please read 'Copyright' file.   *
  4. * NB This program needs the COLOURS module to run. It is in !System.Modules *
  5. *    on Acorns Application disc 1. If in doubt, double click on !System.    *
  6. *****************************************************************************
  7.  
  8. This is the first release of the text editor !Zap.
  9.  
  10. Main features:    * Display may be in text, byte or disassembly format
  11.         * All key short cuts are user definable
  12.         * Automatic updating line numbers & file addresses
  13.         * Full (unix style) wildcard search with your own definable
  14.           macros and search 'throwback' buffers
  15.         * Proper unix tabs and true scrollbar operation
  16.         * Full undo on all operations
  17.         * COPY key causes standard cursor editing
  18.         * All features tested on RISCOS 2 and RISCOS3
  19.         * Fast redraw
  20.         * Full printer driver interface and quick print output
  21.         * Any number of markers on each file, and a facility for
  22.           following branches in disassembly mode
  23.         * Search as you type
  24.         * Learns keys sequences
  25.         * Emacs style Yank (Cut & Paste) and !Edit style move and
  26.           copy implemented.
  27.         * C throwback supported
  28.         * Reads disc sectors/tracks
  29.  
  30. In production:    * Proper BASIC editor 'extension' mode for editing basic
  31.           programs.
  32.         * Fully documented interface so that YOU can write an
  33.           extension mode for zap
  34.         * C programmers extension mode with bracket matching.
  35.         * ... and much more (he lied...)
  36.  
  37. Keys and commands
  38. -----------------
  39.  
  40. Each key has an associated command as given in the 'Keys' file. On startup,
  41. Zap reads this file to create the current key bindings. Thus by editing
  42. the keys file you may change the action of any key to your preference.
  43. Keys not mentioned in the 'keys' file are passed on (eg F12).
  44. A summary of the default setup is given below: (s=shift c=ctrl)
  45.  
  46. Command:    Default key:    Action:
  47.  
  48. DELETE        Delete        Delete last character
  49. DELETENEXT    sDelete        Delete next character
  50. TOGGLEINSERT    Insert        Toggle insert and overwrite modes
  51.                 (shows o in title)
  52. COPY        Copy        Initiates copy mode à la Basic Editor.
  53.                 Note that you may copy from one window to
  54.                 another by selecting on the other.
  55. SELREGION    cCopy        Starts selection of a region via cursor keys.
  56.                 Press Escape to end the selection.
  57. DUMPFILE    scCopy        Produce text image of this file.
  58. ESCAPE        Escape           Stops copy modes/selection modes/search
  59.                 as you type mode/yank mode
  60. TAB        Tab        Inserts a variety of tabs - see tab menu.
  61. FASTUNDO    <-|        See cH
  62. QUICKPRINT    Print        Send file directly to printer
  63. PRINTFILE    sPrint        Print file through printer driver
  64. OPENPRINTER    cPrint        Open printer: filer window
  65. CLOSEPRINTER    scPrint        Close printer: filer window
  66.  
  67. Cursor keys:
  68.  
  69. LEFT        Left            Moves 1 left / goto last mark in code mode
  70. RIGHT        Right        Moves 1 right / jumps to address in code mode
  71. DOWN        Down        Move 1 line down
  72. UP        Up        Move 1 line up
  73. SLEFT        sLeft          Move back one word
  74. SRIGHT        sRight        Move forward one word
  75. SDOWN        sDown/PageDown    Move down a page
  76. SUP        sUp/PageUp        Move up a page
  77. CLEFT        cLeft        Move to start of logical line
  78. CRIGHT        cRight        Move to end of logical line
  79. CDOWN        cDown        Move to end of text (and leave marker)
  80. CUP        cUp        Move to start of text (and leave marker)
  81. SCLEFT        scLeft        Move to the left without moving cursor
  82. SCRIGHT        scRight        Move to the right without moving cursor
  83. SCDOWN        scDown        Move down without moving cursor
  84. SCUP        scUp        Move up without moving cursor
  85.  
  86. Function keys:
  87.  
  88. EXECUTE        F1        Execute currently learnt key sequence (see scL)
  89. HEXASCII    F2        Toggles hex entry mode when byte/word editing
  90.                 (h in title)
  91. SAVE        F3        Brings up save box. You may change filetype
  92.                 etc by moving to the relevant box. Or click
  93.                 the menu button to bring up file type menu.
  94. SEARCHCUR    F4        Brings up Search by Goto box. (See later)
  95. GOTO        F5         Brings up goto line box
  96. TOGGLEMARK    F6         Inserts marker in text/deletes marker
  97. SEARCHBUF    F7        Brings up Search to buffer box. (See later)
  98. FULLUNDO    F8        Full undo (takes slowest path in undo tree)
  99. REDO        F9        Redo (undo last undo whether full or fast)
  100. DELLINE        F10        Delete current line
  101.  
  102. SPLITLINE    sF1        Split line (Inserts a return)
  103. REPLACE        sF4        Brings up search and replace window.
  104. WORDWRAP    sF5        Toggle wordwrap mode (w in title)
  105. LASTMARK    sF6        Previous mark (eg after ctrl-down by mistake)
  106. NEXTMATCH    sF7        Next match (after an F4 or F7)
  107. DELTOSTART    sF10        Delete to start of line
  108.  
  109. JOINLINE    cF1        Join line (delete next return)
  110. SWAPWINDOW    cF2        Swap window (after using new view)
  111. NEWVIEW        cF4        New view (open new window on this file)
  112. HELP        cF5        Brings up help text
  113. NEXTMARK    cF6        Next mark (see sF6)    
  114. LASTMATCH    cF7        Previous match (see sF7)
  115. DELTOEND    cF10        Delete to end of line
  116.  
  117. MODE0        scF1        Text mode  (display in standard text format)
  118. MODE1        scF2        Byte mode  (display in hex bytes)
  119. MODE2        scF3        Word mode  (display in hex words)
  120. MODE3        scF4        Ascii mode (display in characters)
  121. MODE4        scF5        Code mode  (display in disassembled code)
  122. MODE5        scF6        extension mode - 5
  123. MODE6        scF7        extension mode - 6
  124. MODE7        scF8        extension mode - 7
  125. MODE8        scF9        extension mode - 8
  126. MODE9        scF10        extension mode - 9
  127.  
  128. Ctrl letters:
  129.  
  130. LEFT        cB        Back a char     - emacs compatibility
  131. COPYSEL        cC         Copy selected region to current position
  132. DELETE        cD        Delete a char   - emacs compatibility
  133. CRIGHT        cE        Line end    - emacs compatibility
  134. RIGHT        cF        Forward a char  - emacs compatibility    
  135. CANCEL        cG        Cancel search 'as you type' and return to
  136.                 start. Also cancel any yank operations.
  137. FASTUNDO    cH <-|        Fast undo (takes fastest route in tree)
  138. INDIRECT    cI        Indirect (move to the address given by word
  139.                 at cursor)
  140. LEARN        cL        Learn key sequence (see later on)
  141. RETURN        cM        Inserts a return character
  142. DOWN        cN        Next line    - emacs compatibility
  143. UP        cP        Previous line    - emacs compatibility
  144. SEARCHBACK    cR        Reverse search 'as you type'
  145. SEARCHFORWARD    cS        Search 'as you type' forwards
  146. SELECTBUFFER    cT        Select entire buffer
  147. MOVESEL        cV        Move selected region to current position
  148. CUT        cX        Cut/Delete selected region
  149. YANK        cY        Paste/Yank selected region
  150. CLEARSEL    cZ        Clear selection
  151.  
  152. ADDRESSES    scA        Addresses shown at line start
  153. INSERTDATE    scD        Insert current date (format is given in the
  154.                 file 'keys')
  155. NEXTTRACK    scI        Move forward one track
  156. LASTSECTOR    scJ        Move back one sector
  157. NEXTSECTOR    scK        Move forward one sector
  158. LOGICAL        scL        Logical line numbers shown at line start
  159. LASTTRACK    scM        Move back one track
  160. NOLINENOS    scN        Removes line numbers/addresses
  161. TOGGLEHEX    scO        Line numbers shown in hex/decimal
  162. PHYSICAL    scP        Physical line numbers shown at line start
  163. SWAPCHARS    scQ        Swap next two characters around
  164. READONLY    scR        Toggle read only state (r in title)
  165. SWAPCASE    scS        Swap case of next character/selected region
  166. INSERTTIME    scT        Insert current time (format is given in the
  167.                 file 'keys')
  168.  
  169. Letters:
  170. --------
  171.  
  172. In text mode letters are inserted as usual.
  173. In byte mode letters are inserted as usual unless in hex mode (F2) when
  174.  the keys a-f,A-F,0-9 enter hex digits
  175. In word mode + hex mode keys a-f,A-F,0-9 enter hex digits
  176.  
  177. The window title
  178. ----------------
  179.  
  180. Title heading characters:
  181.  *        File altered since last saved
  182.  R        Read only and fixed as read only
  183.  r        Read only but can be toggled to read/write by cR
  184.  u        Undo supported by this file
  185.  o        Overwrite mode active (toggle via Insert key)
  186.  h        Hex entry mode active for Byte/Word (toggle via F2)
  187.  w        Wordwrap mode active (toggle via sF5)
  188.  
  189. Loading/saving files:
  190. ---------------------
  191.  
  192. (a) Double click on a text file to load it.
  193. (b) Hold down left shift and double click on any file typed file to load it.
  194. (c) Drag the file onto the zap icon to load it.
  195. (d) Drag file onto a zap window to insert it at cursor.
  196. (e) Hold down shift and drag file onto a zap window to insert its name.
  197. (f) Ram loads/saves are fully supported and you may save files into themselves.
  198.  
  199. SEARCH AND REPLACE
  200. ==================
  201.  
  202. 1) The Search window
  203. --------------------
  204.  
  205. The search window can be broght up by F4/F7/the 'Zap' menu on a file. 
  206.  
  207. The first column selects whether you wish to search for a string, instruction
  208. or word (4 bytes). In the first two cases enter the string to match. In the
  209. third case enter an expression evaluating to a number to search for.
  210.  
  211. The second column selects where the search should start and the direction of
  212. the search. You may start at the start of text or forwards/backwards from the
  213. current cursor position.
  214.  
  215. The third column selects the output. If you choose cursor output (F4) then
  216. the cursor will be moved to the first match and subsequent matches may be
  217. got by sF7 and scF7 as in the Basic Editor. If you choose 'to buffer'
  218. then all matches are placed in a new (text) file. Double clicking on entries
  219. in this text file cause the cursor to be moved to the corresponding match.
  220.  
  221. 2) Wildcards, macros and case sensitivity
  222. -----------------------------------------
  223.  
  224. In order that the user may have any search syntax he/she chooses, I have
  225. adopted the following approach:
  226.  
  227. a) All wildcards/commands begin with a '/' as listed below.
  228. b) The user may define up to 16 macros (aliases) in terms of these
  229.    commands.
  230. c) When the search string is entered, all the users macros are substituted
  231.    before the search takes place.
  232.  
  233. The macros may be examined and altered by clicking on the 'Show Macros'
  234. button. The default macro definitions are stored in the 'Keys' file and may
  235. be altered there. Whether the search is case sensitive or not can be
  236. controlled by a radio icon in the Macro definitions window.
  237.  
  238. For example, I have * as a standard macro for \#\*. Thus if I typed in
  239. a*b, the string would be converted to a\#\*b. However a\*b would remain
  240. as a\*b as the * follows a \ and is thus treated as a command.
  241.  
  242. Full details of the wildcard commands are given below:
  243.  
  244. x (any char)    Matches 'x' (according to case sensitivity)
  245. \x        Where x is not one of the below matches 'x' case sensitively
  246.  
  247. \( and \)    Act as brackets for bracketing expressions.
  248. \{ and \}    Act as the normal brackets above, but may be referred
  249.         to in the replace string during a search and replace.
  250.  
  251. \#    Matches any character. Eg a\#d matches 'and','aad' but not 'ad'.
  252. \*    Matches any number of the previous expression. Eg fo\* matches
  253.     'f','fo','foo' etc. and \(and\)\* matches '','and','andand' etc
  254. \|    Matches one expression OR another. Eg hello\|goodbye\|fred.
  255.     Eg \(a\|b\)\* matches 'abababa','abbba' etc.
  256. \[..]    Introduces a range of characters to match. Eg \[a-zA-Z%] matches
  257.     any letter or a '%'. If a '^' is given after the opening bracket then
  258.     it acts as a NOT. Thus \[^abc] matches any character except a,b,c.
  259.  
  260. \<    Matches line start (and file start) (useful in code mode)
  261. \>    Matches line end
  262. \C    Turns on case sensitivity for the following string only.
  263.     Eg \CFred\|Bill matches Fred case sensitively but not Bill.
  264. \c    As above but turns off case sensitivity.
  265. \\    Matches a '\'
  266.  
  267. \xxx    Where x is any decimal digit matches that number
  268.     Eg '\0alf' matches 0,'alf' and \233 matches byte 233
  269.     Please note that \999 matches byte 99 followed by '9' as 999>255.
  270. \&xx    As above but matches the hex byte xx when x are valid hex chars.
  271.  
  272. In most cases you will wish to macro '|' as being '\|' and '(' as '\(' etc.
  273.  
  274. Examples (in code mode):
  275. ------------------------
  276.  
  277. SWI                will match any SWI
  278. LDR\|STR        will match any load or store instruction
  279. R6            will match any instruction using R6
  280. BL\#\*&0000A95C        will match any call to &0000A95C
  281.  
  282. 3) Interrupting the search
  283. --------------------------
  284.  
  285. The search will be MUCH faster if you give a definite first character to
  286. start with. Eg 'a\(nd\|pple\)' will be a lot faster than 'and\|apple'.
  287. If the search takes longer than 1/3 second, then an hourglass will come
  288. up displaying the position in the file as a percentage underneath.
  289. You may stop the search by pressing escape, and the partial results will
  290. be displayed if you are using 'Search to buffer'.
  291.  
  292. I think the above should satisfy most persons needs. Please tell me of any
  293. bugs/improvements.
  294.  
  295. 4) Search and Replace
  296. ---------------------
  297.  
  298. A search and replace is activated by sF4 or the File menu. You may
  299. select the search start and direction as above. You may also select
  300. whether the replace is to be selective or global.
  301.  
  302. The format of the search string is described above. The replace string
  303. has the following format:
  304.  
  305. \xxx    replace with the decimal byte xxx as above.
  306. \&xx    replace with the hex byte xx as above.
  307. \x    (for any other character x) replace with a 'x' (eg '\\' -> '\')
  308.  
  309. &n    (where n is 1-9) means replace with the n'th \{,\} expression in the
  310.     search string.
  311.     Eg If the search string is 'a\{\#\}d'
  312.      and the replace string is 'b&1e'
  313.     Then 'and' will be replaced by 'bne' and 'aad' by 'bae' etc
  314. &&    replace with an '&'
  315.  
  316.  
  317. 5) Learning key sequences
  318. -------------------------
  319.  
  320. To learn a new key sequence press cL and then type the sequence. A beep will
  321. be sounded after each logged character to remind you that these key presses
  322. are being buffered. Press cL again to end the sequence. NB ESCAPE will NOT
  323. end the sequence so that escape can be used as part of the sequence.
  324. Pressing F1 will EXECUTE the given sequence.
  325.  
  326. Examples:
  327.  
  328. cL cLeft - > Down cL        ; inserts -> at line start when F1 pressed
  329. cL cS C A T ESCAPE S cL        ; searches for next occurrence of CAT and
  330.                   adds S on the end to get CATS
  331.  
  332. 6) Search as you type
  333. ---------------------
  334.  
  335. Search as you type is activated by pressing cS or cR. The following characters
  336. typed by you are treated as a search string. The cursor is moved to the end
  337. of the next matching search from where you started. You may use 'delete'
  338. to remove characters from the search string. If there is no match then a
  339. beep will sound. This continues until you press a non character key (eg
  340. Escape or a cursor key) in which case the search will halt at the current
  341. position. Alternatively, pressing cG will cause the search to be cancelled
  342. and the cursor returned to its initial position.
  343.  
  344. 7) Miscellaneous
  345. ----------------
  346.  
  347. If the 'Auto delete' option on the Options menu is set then when the last
  348. window on a file is closed, the file is deleted as in !Edit. If the option
  349. is not set then the file remains in memory and new windows can be opened
  350. on it via Create.New view menu option as in !Impression.
  351.  
  352. If the 'Undo' option on the Options menu is unset then newly created files
  353. do not have full undo storage, and operations cannot be undone (other than
  354. by yank). This saves a little memory.
  355.  
  356. =====================================================================
  357.  
  358. I hope you find Zap a useful program.
  359.  
  360. Dominic Symes
  361. September 1992
  362.